package com.kafka.demo.controller;


import com.kafka.demo.VO.ResultVO;
import com.kafka.demo.service.CollectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


@RestController
@RequestMapping("/kafka")
public class CollectController {


    @Autowired
    private CollectService collectService;


    @GetMapping("/send")
    public ResultVO sendKafka(@RequestParam(value = "message",defaultValue = "test")String message,
                              @RequestParam(value = "key",required = false)String key){
        return  collectService.kafkaQueryAll(message,key);
    }

}
